package com.furnitur.core.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@TableName("orders")
public class Order {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    private String orderNo;
    private Long userId;
    private Long addressId;
    private Long merchantId;
    private BigDecimal totalAmount;
    private Integer status;  // 0-待付款，1-待发货，2-待收货，3-已完成，4-已取消
    
    private String receiverName;
    private String receiverPhone;
    private String receiverAddress;
    
    private Date createdAt;
    private Date updatedAt;
    
    private String remark;
    private Integer paymentMethod;  // 1-支付宝，2-微信支付
    private Date paymentTime;
    private Date shippingTime;
    private Date completionTime;
    private Date cancelTime;
    private String cancelReason;
    private String trackingNo;      // 物流单号
    
    @TableField(exist = false)
    private List<OrderItem> orderItems;
} 